tinyvillageuncutfandomcom-20200214-history
Footprint Estimation
What are footprints? All static graphical objects in a board game, are assigned a footprint, which defines where the object is located on the board. In the case of Tiny Village, all objects are assigned a square footprint which might be either 1,1, 2,2, 3,3, 4,4, 5,5, 6,6, 7,7, 8,8 or even 9,9 for the most massive habitats. On the screen, these square footprints actually appear as parallelograms (or diamonds) to enhance the illusion of three dimensions. In this note, we wish to explore how these nine possible footprints produce discrete effects upon such properties as the width, height and file size of graphical objects. We will attempt to assemble a collection of Rules of Scale, which in some cases make it possible to guess the footprint of a graphical object knowing only the size of the file. FIrst Law of Scale: '''Every @2x graphical object has a width '''w (in pixels) given by the simple rule: w = 64n, where n can be 1, 2, 3 , 4 , 5, 6, 7, 8, 9 We will occasionally find small deviations of a few pixels, which can be safely ignored. In contrast the height of graphical objects, is much less constrained. After all, there are many objects of short, average, tall and even super tall stature. The first law of scale would be the definitive rule for estimating the footpring of a graphic except for one sad fact. If we are trying to estimate the footprint, that can only mean we don't actually have the file just yet, but somehow do know the size in bytes of the graphical object. To be useful, footprint estimation must proceed using only the byte size of the graphic. Examples Example: Bamboo Field This graphic is a PNG using the RGB color space and endowed with an Alpha channel. Applying the first law of scale, and noting that the width of 192 = 3 * 64, suggests that this habitat has a weirdly small footprint of only 3,3! Perhaps the wrong image has been provided? We will have to watch this case most closely. Oddly, the calculated size (using Graphic Converter) is only 129.8 kB, about half the stated value of 26.714 kB. THis suggests an error has been made with this file. Example: Dino Flag1 This dino flag is a very small PNG graphic using the RGB color space and endowed with an Alpha channel, like almost all the graphical assets for this program. It has a resolution of 72 ppi. This @2x graphic clearly shows the minimal width of 64, corresponding to the smallest foorprint of 1,1. Note the graphic image is not square. The height of 77 is greater than the width of 64. This is simply because a flag on a flagpole is tall. Definitions: If width > 1.1* height, we say a graphic is tall. If width < 0.9 * height, we say a graphic is short. These break points will be adjusted as more data is integrated into our study. Example: Ingridia Spring Rider @2x This Spring Rider is a small PNG graphic using the RGB color space and endowed with an Alpha channel. It has a 2,2 diamond footprint with a resolution of 72 ppi. Here are its dimensions. This @2x graphic clearly shows a wiidth w = 128 = 2 * 64, corresponding to a footprint of 2,2. Note the graphic image is amost perfectly square. The height of 129 is almost exactly equal to the width of 128. Example: Ingridia Spring Rider @1x Each graphic also has a smaller half-size version. Here is the Ingridia Spring Rider again, but at half size. For these images, the first law is width = 32 * n, and not 64 * n as it is for the full @2x images. It still has a 2,2 diamond footprint with a resolution of 72 ppi. Here are its noticably smaller dimensions. This @1x graphic clearly shows a width w = 64 = 2 * 32, corresponding to a footprint of 2,2 for a @1x graphic. Note the graphic image is amost perfectly square. The height of 65 is almost exactly equal to the width of 64. Extreme Examples The following examples are extreme tests for any footprint estimation algorithm. Example: Dojo House The dojo house is a PNG graphic using the RGB color space and endowed with an Alpha channel. It is believed now to be have a 3,3 footprint, but its file size is unusually large. Since we have the image, we should use the width as the best footprint estimator, thus arriving as the 3,3 footprint. Indeed, the known width of w = 192 is w = 3*64. the First Law. Note however that our first estimate, based solely on file size, predicted a 4,4 footprint, almost certainly an error. This was due to the inexplicable posted size of this file, a massive 28480 bytes for a little 3,3 graphic. Graphic Converter gives a smaller size of only 129.8 kB compared to the posted size of 28.480 kilobytes. Example: Circus Unicorn - An unusually tall graphic The circus unicorn is an unusually tall 2,2 graphic. It is thus easy to mispredict a footprint of 3,3 instead of the known 2,2. However, the width of w = 128 = 2 * 64 is an unequivocal signal that this graphic has a 2,2 footprint. You can also see that this is an extremely tall graphic with the height equal to almost triple the unit cell of 64. Category:Research Lab